|
|
|
| Add Some Stubs for Routines You Need to Write 1. Go ahead and add each of the procedure names shown in the Form_Load() event to the form: | | Private Sub StateLoad()
End Sub
Private Sub HealthCareLoad()
End Sub
Private Sub ListLoad()
End Sub |  | These stubs of routines will be programmed to load each of the normal controls. |
|
|
|
|
|
|
Now that youve added the stubs to this form, youll learn how to load up the main list box with employee names. |
|
|
|
|
|
|
|
|
The ListLoad() procedure is a general form procedure that loads all the employee names from the tblEmployees table into the list box. The source code is shown here: |
|
|
|
 |
|
|
|
|
Private Sub ListLoad()
Dim oRS As Recordset
Dim strSQL As String
strSQL = "SELECT lEmp_id, "
strSQL = strSQL & "szLast_nm, "
strSQL = strSQL & "sFirst_nm "
strSQL = strSQL & "FROM tblEmployees "
Set oRS = New Recordset
oRS.Open strSQL, goConn, _
adOpenForwardOnly, _
adLockReadOnly
|
|
|
|
|
|